<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close" ng-click="close()">
        <span aria-hidden="true">×</span></button>
    <h4 class="modal-title">{{'CONFIG.WIDGET.FILTER'|translate}}</h4>
</div>
<div class="modal-body">
    <div class="row">
        <div class="col-md-12" ng-repeat="alert in alerts">
            <div uib-alert ng-class="'alert-' + (alert.type || 'warning')"
                 close="alerts.splice($index, 1)">{{alert.msg}}
            </div>
        </div>
    </div>
    <div class="row" style="margin-bottom: 10px">
        <div class="col-md-12 form-horizontal">
            <div class="input-group">
                <span class="input-group-addon">{{'CONFIG.WIDGET.FIND'|translate}}</span>
                <input type="text" class="form-control" ng-model="keyword">
            </div>
        </div>
        <br/>
    </div>
    <div class="row">
        <div class="col-md-5">
            <select multiple class="form-control" style="height: 300px">
                <option ng-repeat="v in byFilter?$parent.selectsByFilter:$parent.selects|filter:selected|filter:keyword" ng-click="col.values.push(v)">{{v}}</option>
            </select>
        </div>
        <div class="col-md-2">
            <button class="btn btn-block" style="width: 90px" ng-class="{'eq':'btn-success'}[col.type]" ng-click="col.type='eq'">{{'CONFIG.WIDGET.EQUAL'|translate}}</button>
            <button class="btn btn-block" style="width: 90px" ng-class="{'ne':'btn-success'}[col.type]" ng-click="col.type='ne'">{{'CONFIG.WIDGET.NOT_EQUAL'|translate}}</button>
        </div>
        <div class="col-md-5">
            <select multiple class="form-control" style="height: 300px">
                <option ng-repeat="v in col.values" ng-click="col.values.splice($index, 1)">{{v}}</option>
            </select>
        </div>
    </div>
    <div class="row">
        <div class="col-md-5">
            <label>
                <input type="checkbox" ng-model="byFilter"> {{'CONFIG.WIDGET.SHOW_BY_FILTER'|translate}}
            </label>
        </div>
    </div>
</div>
<div class="modal-footer">
    <button type="button" class="btn btn-default pull-left" data-dismiss="modal" ng-click="close()">{{'COMMON.CANCEL'|translate}}</button>
    <button type="button" class="btn btn-primary" ng-click="ok()">{{'COMMON.OK'|translate}}</button>
</div>
<div class="overlay fa box box-solid" ng-show="status.i!=0">
    <div class="box-header with-border">
        <!--<h3 class="box-title"></h3>-->
        <div class="box-tools pull-right">
            <button type="button" class="btn btn-box-tool" data-widget="remove">
                <i class="fa fa-times" style="font-size: large"></i></button>
        </div>
    </div>
    <i class="fa fa-spinner fa-spin"></i>
</div>